package com.tiger.cloud.model.crm;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tiger.cloud.common.mybatis.TigerBaseEntity;
import com.tiger.cloud.enums.DeleteEnum;
import com.tiger.cloud.enums.LoanRecordBizType;
import com.tiger.cloud.enums.LoanRecordHowEnd;
import com.tiger.cloud.enums.LoanRecordRowType;
import com.tiger.cloud.enums.LoanRecordStatus;
import com.tiger.cloud.enums.LoanRecordType;

import io.swagger.annotations.ApiModelProperty;
/**
 * 
 * crm_loan_record-合作记录/借款记录
 *
 */
public class LoanRecord extends TigerBaseEntity{

	private static final long serialVersionUID = 1L;
    
	/**
	 * 交易类型   1:借款记录、2:合作记录
	 */
	@ApiModelProperty(value = "交易类型   1:借款记录、2:合作记录")
    private LoanRecordRowType type;
	/**
	 * 所属用户
	 */
	@ApiModelProperty(value = "所属用户")
    private Long userId;
	/**
	 * 客户/同行ID
	 */
	@ApiModelProperty(value = "客户/同行ID")
    private Long customerId;
    /**
	 * 客户名称(仅合作记录有值)
	 */
	@ApiModelProperty(value = "客户名称(仅合作记录有值)")
    private String customerName;
	/**
	 * 借款开始日期
	 */
    @DateTimeFormat(pattern="yyyy-MM-dd")   
	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8") 
    @ApiModelProperty(value = "借款开始日期")
    private Date startDate;
	/**
	 * 借款金额
	 */
    @ApiModelProperty(value = "借款金额")
    private BigDecimal amount;
	/**
	 * 借款期限
	 */
    @ApiModelProperty(value = "借款期限")
    private String loanPeriod;
    /**
     * 本业务属于 1:自己开发、2:接单、3:甩单、4:其他
     */
    @ApiModelProperty(value = "本业务属于 1:自己开发、2:接单、3:甩单、4:其他")
    private LoanRecordBizType bizType; 
	/**
	 * 借款类型 1:车辆抵押、2:无抵押、3:零用贷、4:垫资空放、5:不动产抵押、6:其他抵押
	 */
    @ApiModelProperty(value = "借款类型 1:车辆抵押、2:无抵押、3:零用贷、4:垫资空放、5:不动产抵押、6:其他抵押")
    private LoanRecordType loanType;
    /**
	 * 借款类型 1:车辆抵押、2:无抵押、3:零用贷、4:垫资空放、5:不动产抵押、6:其他抵押
	 */
    @ApiModelProperty(value = "借款类型 车辆抵押、无抵押、零用贷、垫资空放、不动产抵押、其他抵押")
    private String loanTypeValue;
	/**
	 * 还款情况
	 */
    @ApiModelProperty(value = "还款情况 1:正常,2:不正常,3:不清楚")
    private LoanRecordStatus status;
	/**
	 * 如何结清
	 */
    @ApiModelProperty(value = "如何结清 1:收款中,2:正常结清, 3:催收结清, 4:坏账, 5:不清楚, 6:不动产抵押")
    private LoanRecordHowEnd howEnd;
	/**
	 * 
	 */
    private Timestamp  createTime;
	/**
	 * 是否删除, 0:正常,1:删除
	 */
    private DeleteEnum isDelete;
	/**
	 * 
	 */
    private Timestamp lastUpdateTime;
    
    public LoanRecord(){
    
    }
    
	public String getLoanTypeValue() {
		return loanTypeValue;
	}

	public void setLoanTypeValue(String loanTypeValue) {
		this.loanTypeValue = loanTypeValue;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public LoanRecordBizType getBizType() {
		return bizType;
	}

	public void setBizType(LoanRecordBizType bizType) {
		this.bizType = bizType;
	}

	public LoanRecordRowType getType() {
        return this.type;
    }
    
    public void setType(LoanRecordRowType type) {
        this.type = type;
    }
    public Long getUserId() {
        return this.userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Long getCustomerId() {
        return this.customerId;
    }
    
    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }
    public Date getStartDate() {
        return this.startDate;
    }
    
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }
    public BigDecimal getAmount() {
        return this.amount;
    }
    
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }
    public String getLoanPeriod() {
        return this.loanPeriod;
    }
    
    public void setLoanPeriod(String loanPeriod) {
        this.loanPeriod = loanPeriod;
    }
    public LoanRecordType getLoanType() {
        return this.loanType;
    }
    
    public void setLoanType(LoanRecordType loanType) {
        this.loanType = loanType;
    }
    public LoanRecordStatus getStatus() {
        return this.status;
    }
    
    public void setStatus(LoanRecordStatus status) {
        this.status = status;
    }
    public LoanRecordHowEnd getHowEnd() {
        return this.howEnd;
    }
    
    public void setHowEnd(LoanRecordHowEnd howEnd) {
        this.howEnd = howEnd;
    }
    public Date getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(Timestamp  createTime) {
        this.createTime = createTime;
    }
    public DeleteEnum getIsDelete() {
        return this.isDelete;
    }
    
    public void setIsDelete(DeleteEnum isDelete) {
        this.isDelete = isDelete;
    }
    public Timestamp getLastUpdateTime() {
        return this.lastUpdateTime;
    }
    
    public void setLastUpdateTime(Timestamp lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }
    
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}